#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :demo.py
# @Time      :2025/7/10 15:26
# @Author    :Ethon


'''
适用于无需登录可访问数据网站,登录页面需使用进阶功能
pip安装:pip install crawl4ai -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
启用报错playwright 相关--->运行:python -m playwright install chromium
'''

import asyncio
from crawl4ai import AsyncWebCrawler


async def main():
    async with AsyncWebCrawler(verbose=True) as crawler:
        result = await crawler.arun(url="https://sugh.szu.edu.cn/html/index.html/")  # 替换为需要的网站
        print(result.markdown)


if __name__ == "__main__":
    asyncio.run(main())
